package com.hjm.common.api.ls.leshua;


import com.hjm.common.api.ls.leshua.entity.TermDto;

import java.util.Map;


public class TestLSCkient {
    public static String agentId="6871328";
    public static String subAgentId="6871328";
    public static String source="pb_externel_kuaishuafu";
//
    public static String baseUrl="http://111.202.198.242:8670/external-api/";//预发布
    public static String signKey="BC2ECF75539743519126B23E0DED5210";

//    private String baseUrl="https://pb-api.leshuazf.com/external-api/";//生产
//    private String signKey="BC2ECF75539743519126B23E0DED5210";



//    public static String baseUrl="http://111.202.198.242:8668/external-api/";//测试
//    public static String signKey="525934EC6B1646D689707653801303D8";

   public static void main(String[] args) {
       try {
           TestLSCkient testLSCkient=new TestLSCkient();
//           testLSCkient.sendMerchantImg();//商户图片上传
//           testLSCkient.sendMerchant();//商户入网
//           testLSCkient.terminalInto();//终端入库
//           testLSCkient.supplement();//设备绑定

//           testLSCkient.rate();
//           testLSCkient.getBankCode();
//           testLSCkient.queryStatus();
//           testLSCkient.getMerchantInfoDetail();
//           testLSCkient.unSupplement();
//           testLSCkient.renlian();
//           testLSCkient.agentWithdrawAmount();
//           testLSCkient.queryAccountAmount();
           testLSCkient.getInvoiceRemainAmount();
//           testLSCkient.findSn();
//           testLSCkient.getSn();
       } catch (Exception e) {

           throw new RuntimeException(e);
       }
   }
    /** 终端入库 */
    public void terminalInto() {
        TermDto termDto = new TermDto();
        termDto.setAgentId("6871328");
        termDto.setSource(source);
        termDto.setTusnList("0008702618F240000000024");
        termDto.setDeviceModel("YZ61Mp");
        Map<String,Object> baseResult = LeShuaUtil.commonRemote(termDto, baseUrl+"/merchantinfo/v3/warehousingPos",signKey);
    }

    /** 终端绑定 */
    public void supplement() {
        TermDto termDto = new TermDto();
        termDto.setAgentId(agentId);
        termDto.setSource(source);
        termDto.setMerchantId("0640010985");
        termDto.setUserName("800000000078261");
        termDto.setSn("9999232987");
        Map<String,Object> baseResult = LeShuaUtil.commonRemote(termDto, baseUrl+"/merchantinfo/v3/bindPosApi","525934EC6B1646D689707653801303D8");
    }


    /** 终端绑定 */
    public void getSn() {
        TermDto termDto = new TermDto();
        termDto.setAgentId(agentId);
        termDto.setSource(source);
        termDto.setTusnList("00003902800100079268");
        termDto.setDeviceModel("YZ61Mp");
        Map<String,Object> baseResult = LeShuaUtil.commonRemote(termDto, baseUrl+"/merchantinfo/v3/searchTusnMapping",signKey);
    }



    public void unSupplement(){
        TermDto termDto = new TermDto();
        termDto.setAgentId(agentId);
        termDto.setSource(source);
        termDto.setMerchantId("3831617353");
        termDto.setUserName("800000000078342");
        termDto.setSn("3532000075");
        Map<String,Object> baseResult = LeShuaUtil.commonRemote(termDto, baseUrl+"/merchantinfo/v3/unbindPos","BC2ECF75539743519126B23E0DED5210");
    }

    public void renlian(){
        TermDto termDto = new TermDto();
        termDto.setAgentId(agentId);
        termDto.setSource(source);
//        termDto.setMerchantId("4558817311");
//        termDto.setSn("3532000052");

        termDto.setMerchantId("7650011167");
        termDto.setSn("9999233011");
        Map<String,Object> baseResult = LeShuaUtil.commonRemote(termDto, baseUrl+"/posRegister/queryWishAppletUrl",signKey);
    }
    public void agentWithdrawAmount(){
        TermDto termDto = new TermDto();
        termDto.setAgentId(agentId);
        termDto.setSource(source);
        termDto.setSubAgentId(subAgentId);

        Map<String,Object> baseResult = LeShuaUtil.commonRemote(termDto, baseUrl+"/agentInfo/agentWithdrawAmount",signKey);
    }
    public void queryAccountAmount(){
        TermDto termDto = new TermDto();
        termDto.setAgentId(agentId);
        termDto.setSource(source);
        Map<String,Object> baseResult = LeShuaUtil.commonRemote(termDto, baseUrl+"/merchantinfo/v3/queryAccountAmount",signKey);
    }

    public void getInvoiceRemainAmount(){
        TermDto termDto = new TermDto();
        termDto.setAgentId(agentId);
        termDto.setSource(source);
        Map<String,Object> baseResult = LeShuaUtil.commonRemote(termDto, baseUrl+"/merchantinfo/v3/getInvoiceRemainAmount",signKey);
    }

    public void findSn(){
        TermDto termDto = new TermDto();
        termDto.setAgentId(agentId);
        termDto.setSource(source);
        termDto.setMerchantId("5560018409");
        Map<String,Object> baseResult = LeShuaUtil.commonRemote(termDto, baseUrl+"/merchantinfo/v3/searchSnMapping","525934EC6B1646D689707653801303D8");
    }


    public void updateAgent(){
        TermDto termDto = new TermDto();
        termDto.setAgentId(agentId);
        termDto.setSource(source);
        termDto.setChangeAgentId("6871328");
        termDto.setSn("3532000051");
        Map<String,Object> baseResult = LeShuaUtil.commonRemote(termDto, baseUrl+"/merchantinfo/v3/changeSnDestination",signKey);
    }

}
